<!--
Author: Quan Van Sinh
Email : sinhvnb@vietnambiz.com
Mobile: 0972405165
-->
<?php addPropertyGeographic(); include ADMIN_INCLUDE_DIR."/header.php";?>
<script type="text/javascript" language="javascript">
    function submitFormGeographic(submitType){
        if(submitType=='exit'){
            $("#submitType").val('exit');
            $("#submitFrmPropertyAddGeographic").click();
        }
    }
</script>
<div class="container_l">
    <form name="formPropertyAddGeographic" id="formPropertyAddGeographic" method="POST" action="">
        <div class="title_user"><img src="images/icon1.gif" />Địa điểm( Thành phố)</div>
        <div class="table_user">
            <div class="table_user_in2">
                <?php
                show_error();
                show_success();
                ?>
                <fieldset>
                    <legend accesskey="N">Thêm mới</legend>
                    <div class="lineaddnew">
                        <div class="lineform">
                            <div class="divlabel">Tiêu đề: <font color="#FF0000">*</font></div>
                            <div class="divform"><input type="text" name="geo_title" value="<?php echo $_REQUEST['geo_title'];?>"/></div>
                        </div>
                        <div class="lineform">
                            <div class="divlabel">Cấp cha:</div>
                            <div class="divform">
                                <select name="geo_parent">
                                    <option value="0">Root</option>
                                    <?php
                                    $arrPropertyCat = listAllPropertyGeographic($parent_id = 0);
                                    for($i=0;$i<count($arrPropertyCat);$i++) {
                                        ?>
                                    <option <?php echo setSelectedBoxValue($_REQUEST['geo_parent'], $arrPropertyCat[$i]['geo_id']);?> value="<?php echo $arrPropertyCat[$i]['geo_id'];?>"><?php echo $arrPropertyCat[$i]['geo_title'];?></option>
                                    <?php
                                    }
                                    ?>
                                </select>
                            </div>
                        </div>
                        <div class="lineform">
                            <div class="divlabel">Mô tả:</div>
                            <div class="divform"><textarea name="geo_description" cols="10" rows="10" style="overflow:hidden;"><?php echo $_REQUEST['geo_description'];?></textarea></div>
                        </div>
                        <div class="lineform">
                            <div class="divlabel">Kích hoạt:</div>
                            <div><input type="radio" name="geo_active" value="yes" <?php echo setCheckedBoxValue($_REQUEST['geo_active'],'yes', true);?> /> Có &nbsp;&nbsp; <input type="radio" name="geo_active" value="no" <?php echo setCheckedBoxValue($_REQUEST['geo_active'],'no');?> /> Không</div>
                        </div>
                    </div>
                    <div class="spacer1"><span></span></div>
                </fieldset>
                <div class="linesubmit">
                    <input type="hidden" name="submitType" id="submitType" value="">
                    <input type="submit" name="submitFrmPropertyAddGeographic" id="submitFrmPropertyAddGeographic" value="Lưu lại" class="button" />
                    <input type="button" name="submitFrmPropertyAddGeographicAndExit" onclick="javascipt:history.go(-1);" value="Thoát" class="button" />
                </div>

            </div>
        </div>
    </form>
</div>

<?php
include "inc/right.php";
include ADMIN_INCLUDE_DIR."/footer.php";
?>